package com.change.common.Enums;

public enum OrderStatus {
    Draft  ("草稿", 0), Confirmed  ("待归类", 1),Classified   ("待报价", 2),
    Quoted   ("待客户确认", 3), QuoteConfirmed   (" 待报关", 4),Declared    ("待出库", 5),
    WarehouseExited   ("待收货", 6), Completed   ("完成", 7),Returned    ("已退回", 8),
    Canceled    ("已取消", 9);
    // 成员变量
    private String name;
    private int index;
    // 构造方法
    private OrderStatus(String name, int index) {
        this.name = name;
        this.index = index;
    }
    // 普通方法
    public static String getName(int index) {
        for (OrderStatus c : OrderStatus.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getIndex() {
        return index;
    }
    public void setIndex(int index) {
        this.index = index;
    }
}
